
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="renderer" content="webkit" />
    <link rel="shortcut icon" href="favicon.ico">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content="Cheney" />
    
    <title>MxsDoc</title>
    <link href="css/logo/logo.css" rel="stylesheet">
    <!-- Bootstrap -->
    <link href="static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link href="static/highlight/styles/default.css" rel="stylesheet">
    <link href="static/highlight/styles/zenburn.css" rel="stylesheet">
    <link href="static/zTree/css/metroStyle/metroStyle.css" rel="stylesheet">
    <link href="static/nprogress/nprogress.css" rel="stylesheet">
    <link href="static/styles/kancloud.css" rel="stylesheet">
    <link href="static/bootstrapQ/qiao.css" rel="stylesheet">
    <link href="static/markdown/css/editormd.min.css" rel="stylesheet">
    <link href="static/zTree/css/metroStyle/standardStyle.css" rel="stylesheet" id="zTreeCss">
    

	<!-- FreeTeam CSS-->
	<link rel="stylesheet" href="static/freeTeam/css/resetV2.css" type="text/css" media="screen" />
	<link rel="stylesheet" href="static/freeTeam/css/boot-css/bootstrap.custom.css" type="text/css" media="screen" /> 

	<!-- context.js -->
	<link rel="stylesheet" type="text/css" href="static/ContextJS/css/demo.css">
	<link rel="stylesheet" type="text/css" href="static/ContextJS/css/context.standalone.css">
    <script src="static/scripts/jquery.min.js" type="text/javascript"></script>
    <!-- Include all compiled plugins (below), or include individual file	s as needed -->
	<script type="text/javascript" src="static/bootstrap/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="static/layer/layer.js"></script>
	<script type="text/javascript" src="static/nprogress/nprogress.js"></script>
	<script type="text/javascript" src="static/highlight/highlight.js"></script>
	<script type="text/javascript" src="static/highlight/highlightjs-line-numbers.min.js"></script>
	<script type="text/javascript" src="static/bootstrapQ/qiao.js"></script>
	<script type="application/javascript" src="static/markdown/lib/raphael.min.js"></script>
	<script type="application/javascript" src="static/scripts/jsonEscape.js"></script>
	<!-- For ajax form submit -->
	<script  type="text/javascript" src="static/scripts/jquery.form.js"></script>
    <script src="js/common.js" type="text/javascript"></script>
    <script src="js/DocSys.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/base64.js"></script>
</head>
<body>
<div class="m-manual manual-reader">
    <header class="navbar navbar-static-top manual-head" role="banner">
        <div class="container-fluid">
            <div class="navbar-header pull-left manual-title">
            	<a class="navbar-brand" href="/DocSystem/web/projects.html">
            		<i class="logo small"></i> 
            		MxsDoc
            	</a>
                <span class="slidebar" id="slidebar">
                    <i class="fa fa-align-justify"></i>
                </span>
            </div>

            <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
                <ul class="nav navbar-nav navbar-left">
                	<div>开放API测试</div>
            	</ul>
            </nav>
        </div>      
    </header>
    <article class="container-fluid manual-body">
        <div class="manual-right" style="left:0px;overflow-y: auto;">
            <div class="manual-article">
               <div class="article-body editor-content"  id="doc" style="min-height: 650px">
               		<div class="panel-body eventset-list" >	
	               		<li class="eventset-tit" style="margin-top: 0px;">
							<i class="cell w7">名称</i>
							<i class="cell w20">地址</i>
							<i class="cell w15">参数</i>
							<i class="cell w10">结果</i>
							<i class="cell w10">操作</i>						
						</li>
					</div>
               		<div class="panel-body eventset-list">
			 			<li>	
			 				<i class="cell w7">获取授权码</i> 	
			 				<i class="cell w20">		
			 					<input id="getAuthCodeUrl" value="http://localhost:8100/DocSystem/Bussiness/getAuthCode.do" type="text" style="width:80%">
			 				</i>	
			 				<i class="cell w15">		
			 					<textarea id="getAuthCodeParam">
			 					{
			 						"userName":"Admin",
			 						"pwd":"Admin",
			 						"type":1
			 					}		 					
			 					</textarea>
			 				</i>	
			 				<i class="cell w10">		
			 					<textarea id="getAuthCodeResult"></textarea>
			 				</i>
			 				<i class="cell w10">
			 					<a href="javascript:void(0)" onclick="getAuthCodeTest();" class="mybtn-primary">获取授权码</a>
			 				</i>
			 			</li>
			 			<li>	
			 				<i class="cell w7">获取文件列表</i> 	
			 				<i class="cell w20">		
			 					<input id="getSubDocListUrl" value="http://localhost:8100/DocSystem/Repos/getSubDocListRS.do" type="text" style="width:80%">
			 				</i>	
			 				<i class="cell w15">		
			 					<textarea id="getSubDocListParam">
			 					{
			 						"reposId":1,
			 						"path":""
			 					}		 					
			 					</textarea>
			 				</i>
			 				<i class="cell w10">		
			 					<textarea id="getSubDocListResult"></textarea>
			 				</i>
			 				<i class="cell w10">
			 					<a href="javascript:void(0)" onclick="getSubDocListTest();" class="mybtn-primary">获取文件列表</a>
			 				</i>
			 			</li>
			 			<li>	
			 				<i class="cell w7">获取文件信息</i> 	
			 				<i class="cell w20">		
			 					<input id="getDocInfoUrl" value="http://localhost:8100/DocSystem/Doc/getDocRS.do" type="text" style="width:80%">
			 				</i>	
			 				<i class="cell w15">		
			 					<textarea id="getDocInfoParam">
			 					{
			 						"reposId":1,
			 						"path":"",
			 						"name":"test1.txt"
			 					}		 					
			 					</textarea>
			 				</i>
			 				<i class="cell w10">		
			 					<textarea id="getDocInfoResult"></textarea>
			 				</i>
			 				<i class="cell w10">
			 					<a href="javascript:void(0)" onclick="getDocInfoTest();" class="mybtn-primary">获取文件信息</a>
			 				</i>
			 			</li>
			 			<li>	
			 				<i class="cell w7">获取下载链接</i> 	
			 				<i class="cell w20">		
			 					<input id="getDocFileLinkUrl" value="http://localhost:8100/DocSystem/Doc/getDocFileLinkRS.do" type="text" style="width:80%">
			 				</i>	
			 				<i class="cell w15">		
			 					<textarea id="getDocFileLinkParam">
			 					{
			 						"reposId":1,
			 						"path":"",
			 						"name":"test1.txt",
			 						"urlStyle":"REST"
			 					}		 					
			 					</textarea>			 					
			 				</i>
			 				<i class="cell w10">		
			 					<textarea id="getDocFileLinkResult"></textarea>
			 				</i>
			 				<i class="cell w10">
			 					<a href="javascript:void(0)" onclick="getDocFileLinkTest();" class="mybtn-primary">获取下载链接</a>
			 				</i>
			 			</li>
			 			<li>	
			 				<i class="cell w7">新增文件</i> 	
			 				<i class="cell w20">		
			 					<input id="addDocUrl" value="http://localhost:8100/DocSystem/Doc/addDocRS.do" type="text" style="width:80%">
			 				</i>	
			 				<i class="cell w15">		
			 					<textarea id="addDocParam">
			 					{
			 						"taskId":"123456",
			 						"reposId":1,
			 						"path":"",
			 						"name":"test1.txt",
			 						"type":1
			 					}		 					
			 					</textarea>		
			 				</i>
			 				<i class="cell w10">		
			 					<textarea id="addDocResult"></textarea>
			 				</i>
			 				<i class="cell w10">
			 					<a href="javascript:void(0)" onclick="addDocTest();" class="mybtn-primary">新增文件</a>
			 				</i>
			 			</li>
			 			<li>	
			 				<i class="cell w7">复制文件</i> 	
			 				<i class="cell w20">		
			 					<input id="copyDocUrl" value="http://localhost:8100/DocSystem/Doc/copyDocRS.do" type="text" style="width:80%">
			 				</i>	
			 				<i class="cell w15">		
			 					<textarea id="copyDocParam">
			 					{
			 						"taskId":"123456",
			 						"reposId":1,
			 						"srcPath":"",
			 						"srcName":"test1.txt",
			 						"dstPath":"copyTest/",
			 						"dstName":"test2.txt",
			 						"isMove":0
			 					}		 					
			 					</textarea>	
			 				</i>
			 				<i class="cell w10">		
			 					<textarea id="copyDocResult"></textarea>
			 				</i>
			 				<i class="cell w10">
			 					<a href="javascript:void(0)" onclick="copyDocTest();" class="mybtn-primary">复制文件</a>
			 				</i>
			 			</li>
			 			<li>	
			 				<i class="cell w7">上传文件</i>
			 				<i class="cell w20">		
			 					<input id="uploadDocUrl" value="http://localhost:8100/DocSystem/Doc/uploadDocRS.do" type="text" style="width:80%">
			 				</i>	
			 				<i class="cell w15">		
			 					<textarea id="uploadDocParam">
			 					{
			 					
			 						"reposId":1,
			 						"path":"",
			 						"name":"test2.txt",
			 						"fileLink":"http://localhost:8100/DocSystem/Doc/downloadDoc/1/0/dGVzdDEudHh0/QzovRG9jU3lzUmVwb3Nlcy8xL2RhdGEvcmRhdGEv/dGVzdDEudHh0/-572270089/0/1",
			 						"size":0,
			 						"type":1			 						
			 					}		 					
			 					</textarea>	
			 				</i>
			 				<i class="cell w10">		
			 					<textarea id="uploadDocResult"></textarea>
			 				</i>
			 				<i class="cell w10">
			 					<a href="javascript:void(0)" onclick="uploadDocTest();" class="mybtn-primary">上传文件</a>
			 				</i>
			 			</li>
			 			<li>	
			 				<i class="cell w7">推送文件</i> 	
			 				<i class="cell w20">		
			 					<input id="pushDocUrl" value="http://localhost:8100/DocSystem/Doc/pushDocRS.do" type="text" style="width:80%">
			 				</i>	
			 				<i class="cell w15">		
			 					<textarea id="pushDocParam">
			 					{
			 						"taskId":"123456",
			 						"reposId":1,
			 						"path":"",
			 						"name":"test1.txt",
			 						"targetReposId":1,
			 						"targetPath":"pushTest/",
			 						"recurciveEn":1,
			 						"forceEn":1			 						
			 					}		 					
			 					</textarea>	
			 				</i>
			 				<i class="cell w10">		
			 					<textarea id="pushDocResult"></textarea>
			 				</i>
			 				<i class="cell w10">
			 					<a href="javascript:void(0)" onclick="pushDocTest();" class="mybtn-primary">推送文件</a>
			 				</i>
			 			</li>
			 			<li>	
			 				<i class="cell w7">删除文件</i> 	
			 				<i class="cell w20">		
			 					<input id="deleteDocUrl" value="http://localhost:8100/DocSystem/Doc/deleteDocRS.do" type="text" style="width:80%">
			 				</i>	
			 				<i class="cell w15">		
			 					<textarea id="deleteDocParam">
			 					{
			 						"taskId":"123456",
			 						"reposId":1,
			 						"path":"",
			 						"name":"test1.txt"
			 					}		 					
			 					</textarea>	
			 				</i>
			 				<i class="cell w10">		
			 					<textarea id="deleteDocResult"></textarea>
			 				</i>
			 				<i class="cell w10">
			 					<a href="javascript:void(0)" onclick="deleteDocTest();" class="mybtn-primary">删除文件</a>
			 				</i>
			 			</li>
			 			<li>	
			 				<i class="cell w7">查询系统日志</i> 	
			 				<i class="cell w20">		
			 					<input id="querySystemLogUrl" value="http://localhost:8100/DocSystem/Doc/querySystemLog.do" type="text" style="width:80%">
			 				</i>	
			 				<i class="cell w15">		
			 					<textarea id="querySystemLogParam">
			 					{
			 						"queryId":"123456"
			 					}		 					
			 					</textarea>	
			 				</i>
			 				<i class="cell w10">		
			 					<textarea id="querySystemLogResult"></textarea>
			 				</i>
			 				<i class="cell w10">
			 					<a href="javascript:void(0)" onclick="querySystemLogTest();" class="mybtn-primary">查询系统日志</a>
			 				</i>
			 			</li>
			 			<li>	
			 				<i class="cell w7">查询文件历史</i> 	
			 				<i class="cell w20">		
			 					<input id="getDocHistoryUrl" value="http://localhost:8100/DocSystem/Doc/getDocHistory.do" type="text" style="width:80%">
			 				</i>	
			 				<i class="cell w15">		
			 					<textarea id="getDocHistoryParam">
			 					{
			 						"reposId":184,
			 						"path":"",
			 						"name":"",
			 						"historyType": "0"	 						
			 					}		 					
			 					</textarea>	
			 				</i>
			 				<i class="cell w10">		
			 					<textarea id="getDocHistoryResult"></textarea>
			 				</i>
			 				<i class="cell w10">
			 					<a href="javascript:void(0)" onclick="getDocHistoryTest();" class="mybtn-primary">查询文件历史</a>
			 				</i>
			 			</li>
			 			<li>	
			 				<i class="cell w7">查询历史详情</i> 	
			 				<i class="cell w20">		
			 					<input id="getHistoryDetailUrl" value="http://localhost:8100/DocSystem/Doc/getHistoryDetail.do" type="text" style="width:80%">
			 				</i>	
			 				<i class="cell w15">		
			 					<textarea id="getHistoryDetailParam">
			 					{
			 						"reposId":184,
			 						"path":"",
			 						"name":"",
			 						"historyType": "0"	 						
			 					}		 					
			 					</textarea>	
			 				</i>
			 				<i class="cell w10">		
			 					<textarea id="getHistoryDetailResult"></textarea>
			 				</i>
			 				<i class="cell w10">
			 					<a href="javascript:void(0)" onclick="getHistoryDetailTest();" class="mybtn-primary">查询历史详情</a>
			 				</i>
			 			</li>
			</div>
        <div class="manual-progress"><b class="progress-bar"></b></div>
    </article>
    <div class="manual-mask"></div>
</div>

<script type="text/javascript">
var gAuthCode = "";

//页面加载完成处理函数    
$(document).ready(function(){
	console.log("Page is ready");
});

function getAuthCodeTest()
{	
	var paramStr = $("#getAuthCodeParam").val();
	console.log(paramStr);	
	var param = JSON.parse(paramStr);
	console.log(param);
	
	$.ajax({
        url : $("#getAuthCodeUrl").val(),
        type : "post",
        dataType : "json",
        data : {
            userName: param.userName,
			pwd: base64_encode(param.pwd),
			type: param.type
        },
        success : function (ret) {
     		if(ret.status == "ok")
        	{
            	gAuthCode = ret.data;
            	$("#getAuthCodeResult").val(JSON.stringify(ret));
     			alert("获取授权码成功:" + ret.data);
			}
            else
            {
            	$("#getAuthCodeResult").val(JSON.stringify(ret));
            	alert("获取授权码失败:" + ret.msgInfo);
            }
        },
        error : function () {
        	alert("获取授权码失败: 服务器异常");
        }
    });
}

function getSubDocListTest()
{	
	var paramStr = $("#getSubDocListParam").val();
	console.log(paramStr);	
	var param = JSON.parse(paramStr);
	console.log(param);
	
	$.ajax({
        url : $("#getSubDocListUrl").val(),
        type : "post",
        dataType : "json",
        data : {
            reposId: param.reposId,
            path: param.path,
            authCode: gAuthCode,
        },
        success : function (ret) {
     		if(ret.status == "ok")
        	{
     			$("#getSubDocListResult").val(JSON.stringify(ret));
     			alert("获取文件列表成功");
        	}
            else
            {
            	$("#getSubDocListResult").val(JSON.stringify(ret));
            	alert("获取文件列表失败:" + ret.msgInfo);
            }
        },
        error : function () {
        	alert ("获取文件列表失败: 服务器异常");
        }
    });
}

function getDocInfoTest()
{	
	var paramStr = $("#getDocInfoParam").val();
	console.log(paramStr);	
	var param = JSON.parse(paramStr);
	console.log(param);
	
	$.ajax({
        url : $("#getDocInfoUrl").val(),
        type : "post",
        dataType : "json",
        data : {
            reposId: param.reposId,
            path: param.path,
			name: param.name,
            authCode: gAuthCode,
        },
        success : function (ret) {
     		if(ret.status == "ok")
        	{
     			$("#getDocInfoResult").val(JSON.stringify(ret));
     			alert("获取文件信息成功");
        	}
            else
            {
				//getSubDocList failed
            	$("#getDocInfoResult").val(JSON.stringify(ret));
            	alert("获取文件信息失败:" + ret.msgInfo);
            }
        },
        error : function () {
        	alert ("获取文件信息失败: 服务器异常");
        }
    });
}

function getDocFileLinkTest()
{	
	var paramStr = $("#getDocFileLinkParam").val();
	console.log(paramStr);	
	var param = JSON.parse(paramStr);
	console.log(param);
	
	$.ajax({
        url : $("#getDocFileLinkUrl").val(),
        type : "post",
        dataType : "json",
        data : {
        	reposId: param.reposId,
            path: param.path,
            name: param.name,
            urlStyle: param.urlStyle,
            authCode: gAuthCode,
        },
        success : function (ret) {
        	if( "ok" == ret.status )
        	{
        		var docLink = ret.data;
        		fileLink = buildFullLink(docLink);
        		$("#getDocFileLinkResult").val(JSON.stringify(ret));
        		alert("获取文件链接成功");
        	}
            else 
            {
        		$("#getDocFileLinkResult").val(JSON.stringify(ret));
            	alert("获取文件链接失败:" + ret.msgInfo);
            }
        },
        error : function () {
        	errorInfo = "获取文件信息失败：服务器异常";
        }
    });
}

function addDocTest()
{		
	var paramStr = $("#addDocParam").val();
	console.log(paramStr);	
	var param = JSON.parse(paramStr);
	console.log(param);
	
	$.ajax({
        url : $("#addDocUrl").val(),
        type : "post",
        dataType : "json",
        data : {
			taskId:param.taskId,
        	reposId: param.reposId,
            path: param.path,
			name: param.name,
			type: param.type,
            authCode: gAuthCode,
        },
        success : function (ret) {
     		if(ret.status == "ok")
        	{
     			$("#addDocResult").val(JSON.stringify(ret));
     			alert("新增文件成功");
			}
            else
            {
     			$("#addDocResult").val(JSON.stringify(ret));
            	alert("新增文件失败:" + ret.msgInfo);
            }
        },
        error : function () {
        	alert ("新增文件失败: 服务器异常");
        }
    });
}

function copyDocTest()
{	
	var paramStr = $("#copyDocParam").val();
	console.log(paramStr);	
	var param = JSON.parse(paramStr);
	console.log(param);
	
	$.ajax({
        url : $("#copyDocUrl").val(),
        type : "post",
        dataType : "json",
        data : {
			taskId:param.taskId,
            reposId: param.reposId,
            srcPath: param.srcPath,
			srcName: param.srcName,
			dstPath: param.dstPath,
			dstName: param.dstName,
			isMove: param.isMove,
            authCode: gAuthCode,
        },
        success : function (ret) {
     		if(ret.status == "ok")
        	{
     			$("#copyDocResult").val(JSON.stringify(ret));
     			alert("复制文件成功");
			}
            else
            {
     			$("#copyDocResult").val(JSON.stringify(ret));
            	alert("复制文件失败:" + ret.msgInfo);
            }
        },
        error : function () {
        	alert ("复制文件失败: 服务器异常");
        }
    });
}

function uploadDocTest()
{	
	var paramStr = $("#uploadDocParam").val();
	console.log(paramStr);	
	var param = JSON.parse(paramStr);
	console.log(param);
	
	$.ajax({
        url : $("#uploadDocUrl").val(),
        type : "post",
        dataType : "json",
        data : {
			taskId:param.taskId,
            reposId: param.reposId,
            path: param.path,
			name: param.name,
			size: param.size,
			fileLink: param.fileLink,
            authCode: gAuthCode,
        },
        success : function (ret) {
     		if(ret.status == "ok")
        	{
     			$("#uploadDocResult").val(JSON.stringify(ret));
     			alert("上传文件成功:", ret.data);
			}
            else
            {
            	$("#uploadDocResult").val(JSON.stringify(ret));
            	alert("上传文件失败:" + ret.msgInfo);
            }
        },
        error : function () {
        	alert ("上传文件失败: 服务器异常");
        }
    });
}

function pushDocTest()
{
	var paramStr = $("#pushDocParam").val();
	console.log(paramStr);	
	var param = JSON.parse(paramStr);
	console.log(param);
	
	$.ajax({
        url : $("#pushDocUrl").val(),
        type : "post",
        dataType : "json",
        data : {
			taskId:param.taskId,
            reposId: param.reposId,
            path: param.path,
			name: param.name,
			targetReposId: param.targetReposId,
            targetPath: param.targetPath,
            recurciveEn: param.recurciveEn,
            forceEn: param.recurciveEn,
            authCode: gAuthCode
        },
        success : function (ret) {
     		if(ret.status == "ok")
        	{
     			$("#pushDocResult").val(JSON.stringify(ret));
     			alert("推送文件成功");
			}
            else
            {
     			$("#pushDocResult").val(JSON.stringify(ret));
            	alert("推送文件失败:" + ret.msgInfo);
            }
        },
        error : function () {
        	alert ("推送文件失败: 服务器异常");
        }
    });
}

function deleteDocTest()
{		
	var paramStr = $("#deleteDocParam").val();
	console.log(paramStr);	
	var param = JSON.parse(paramStr);
	console.log(param);
	
	$.ajax({
        url : $("#deleteDocUrl").val(),
        type : "post",
        dataType : "json",
        data : {
			taskId:param.taskId,
            reposId: param.reposId,
            path: param.path,
			name: param.name,
			authCode: gAuthCode,
        },
        success : function (ret) {
     		if(ret.status == "ok")
        	{
            	alert("删除文件成功:");
            	$("#deleteDocResult").val(JSON.stringify(ret));
			}
            else
            {
            	alert("删除文件失败:" + ret.msgInfo);
            	$("#deleteDocResult").val(JSON.stringify(ret));        		
            }
        },
        error : function () {
        	alert ("删除文件失败: 服务器异常");
        }
    });
}


function querySystemLogTest()
{
	var paramStr = $("#querySystemLogParam").val();
	console.log(paramStr);	
	var param = JSON.parse(paramStr);
	console.log(param);
	
	$.ajax({
        url : $("#querySystemLogUrl").val(),
        type : "post",
        dataType : "json",
        data : {
            queryId: param.queryId,
			event: param.event,
            reposName: param.reposName,
            path:param.path,
            name:param.name,
            userId:param.userId,
            userName:param.userName,
            startTime: param.startTime,
            endTime:param.endTime,
            authCode: gAuthCode,
        },
        success : function (ret) {
        	console.log("querySystemLogTest", ret)
     		if(ret.status == "ok")
        	{
            	alert("查询系统日志成功");
            	$("#querySystemLogResult").val(JSON.stringify(ret));
			}
            else
            {
            	alert("查询系统日志失败:" + ret.msgInfo);
            	$("#querySystemLogResult").val(JSON.stringify(ret));        		
            }
        },
        error : function () {
        	alert ("查询系统日志失败: 服务器异常");
        }
    });
}

function getDocHistoryTest()
{
	var paramStr = $("#getDocHistoryParam").val();
	console.log(paramStr);	
	var param = JSON.parse(paramStr);
	console.log(param);
	
	$.ajax({
        url : $("#getDocHistoryUrl").val(),
        type : "post",
        dataType : "json",
        data : {
            reposId: param.reposId,
            path:param.path,
            name:param.name,
            historyType:param.historyType,
            authCode: gAuthCode,
        },
        success : function (ret) {
        	console.log("getDocHistoryTest", ret)
     		if(ret.status == "ok")
        	{
            	alert("获取文件历史成功");
            	$("#getDocHistoryResult").val(JSON.stringify(ret));
			}
            else
            {
            	alert("获取文件历史失败:" + ret.msgInfo);
            	$("#getDocHistoryTestResult").val(JSON.stringify(ret));        		
            }
        },
        error : function () {
        	alert ("获取文件历史失败: 服务器异常");
        }
    });
}

function getHistoryDetailTest()
{
	var paramStr = $("#getHistoryDetailParam").val();
	console.log(paramStr);	
	var param = JSON.parse(paramStr);
	console.log(param);
	
	$.ajax({
        url : $("#getHistoryDetailUrl").val(),
        type : "post",
        dataType : "json",
        data : {
            reposId: param.reposId,
            path:param.path,
            name:param.name,
            historyType:param.historyType,
            authCode: gAuthCode,
        },
        success : function (ret) {
        	console.log("getHistoryDetailTest", ret)
     		if(ret.status == "ok")
        	{
            	alert("获取历史详情成功");
            	$("#getHistoryDetailResult").val(JSON.stringify(ret));
			}
            else
            {
            	alert("获取历史详情失败:" + ret.msgInfo);
            	$("#getHistoryDetailResult").val(JSON.stringify(ret));        		
            }
        },
        error : function () {
        	alert ("获取历史详情失败: 服务器异常");
        }
    });
}

</script>
</body>
</html>